<template>
  <div>
    <h3 class="title">{{goodsDesc.title}}</h3>
    <hr>
    <div class="content" v-html="goodsDesc.content"></div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      goodsDesc:{}
    };
  },
  created(){
      this.getGoodsDesc()
  },
  methods:{
     async getGoodsDesc(){
        const {data}=await this.$http.get('/api/goods/getdesc/'+this.id);
        if(data.status===0){
            return this.goodsDesc=data.message[0];
        } 
      }
  },
  props:['id']
};
</script>

<style lang="scss" scoped>
.title{
    font-size: 14px;
    margin: 10px 0;
    color: blue;
    text-align: center;
}
.content{
   /deep/ img {
       width: 100%;
    }
}
</style>